 #{extends 'main.html'/}
  %{
        _ACCOUNT_LIST = models.accounts.AccountConstant.DIC_ACCOUNT_LIST_NAME;
 }%
  <div class="row wrapper  white-bg page-heading">
        <!-- <div class="wrapper wrapper-content animated fadeInRight"> -->
            <div class="row">
                <div class="col-lg-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>中继号码编辑</h5>
                        </div>
                        <div class="ibox-content">
                        #{form @resource.TrunkNos.update(trunkNo?.id),method:'PUT',id:'editForm',class:'form-horizontal'}
                            <div class="form-group form-inline">
                                #{f.text_field 'trunkNo.trunkNo',label:'号码',required:'true',value:trunkNo?.trunkNo /}
                            </div>
                            <div class="form-group form-inline">
                                #{f.select 'trunkNo.accountId',dicName:_ACCOUNT_LIST,value:params['trunkNo.accountId']?params['trunkNo.accountId']:trunkNo?.accountId,blank:'true',blankTitle:'请选择',label:'所属企业' /}
                            </div>
                                   
                                
                                <div class="form-group">
                                    <div class="col-sm-4 form-btn-area">
                                       #{f.button '保存',href:'javascript:submitForm();',class:"btn btn-primary" /}
                                       #{f.button '取消',href:@resource.TrunkNos.index(),class:"btn btn-white"/}
                                    </div>
                                </div>
                           #{/form}
                        </div>
                    </div>
                </div>
            </div>
        </div>
       <script type="text/javascript">
       function submitForm(){
          $('#editForm').submit();    
       }
       </script> 